import 'package:flutter_jdshop/generated/json/base/json_convert_content.dart';
import 'package:flutter_jdshop/model/home/banner_bean.dart';

BannerBean $BannerBeanFromJson(Map<String, dynamic> json) {
	final BannerBean bannerBean = BannerBean();
	final List<BannerResult>? result = jsonConvert.convertListNotNull<BannerResult>(json['result']);
	if (result != null) {
		bannerBean.result = result;
	}
	return bannerBean;
}

Map<String, dynamic> $BannerBeanToJson(BannerBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['result'] =  entity.result.map((v) => v.toJson()).toList();
	return data;
}

BannerResult $BannerResultFromJson(Map<String, dynamic> json) {
	final BannerResult bannerResult = BannerResult();
	final String? sId = jsonConvert.convert<String>(json['_id']);
	if (sId != null) {
		bannerResult.sId = sId;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		bannerResult.title = title;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		bannerResult.status = status;
	}
	final String? pic = jsonConvert.convert<String>(json['pic']);
	if (pic != null) {
		bannerResult.pic = pic;
	}
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		bannerResult.url = url;
	}
	return bannerResult;
}

Map<String, dynamic> $BannerResultToJson(BannerResult entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['_id'] = entity.sId;
	data['title'] = entity.title;
	data['status'] = entity.status;
	data['pic'] = entity.pic;
	data['url'] = entity.url;
	return data;
}